<%@page import="xmlasm.bo.UserBO"%>
<%@page import="utils.XMLUtils"%>
<%@page import="xmlasm.sync.FilePathHolder"%>
<%@page import="org.w3c.dom.Document"%>
<%@page import="xmlasm.dto.User"%>
<%@ page contentType="text/html; charset=UTF-8" %>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <!-- base href="http://www.getsiteadmin.com/demo/siteAdmin/" -->
        <title>${param.title}</title>
        <link href="css/geral.css" rel="stylesheet"/>
        <link href="css/admin.css" rel="stylesheet"/>
        <link rel="shortcut icon" href="img/admin.ico"/>

    </head>

    <body id="home">
        <c:if test="${not USER.isAdmin}">
            <jsp:forward page="login.html"/>
        </c:if>
        <%
                    if (session.getAttribute("USER") != null) {
                        User user = new User();
                        user = (User) session.getAttribute("USER");
                        if ((UserBO.checkIsActive(user.getUserId()) == false) || (UserBO.checkIsAdmin(user.getUserId()) == false)) {
        %>
        <jsp:forward page="login.html"/>
        <%                                    //RequestDispatcher rd = request.getRequestDispatcher("login.html");
                            //rd.forward(request, response);
                        }
                    }
        %>
        <!-- Begin cai div ve dau trang -->
        <div id="top-page"></div>
        <!-- End div ve dau trang -->

        <!-- Button ve dau trang -->
        <a id="totop" class="bgcolor" title="back to top" href="#top-page">
            <img title="" alt="top" src="img/backtop.gif"/> Về đầu trang
        </a>
        <!-- End button -->

        <div id="wrap" class="en">
            <div id="header" class="bgcolor">
                <h1><a href="#" title="Go to website">Fish ReaderDB</a></h1>
                <div id="user" >Chào, ${USER.fullName} | <a href="logout.action" >logout</a></div>
                <h3>${param.title}</h3>
            </div>
            <div id="sidebar" >
                <ul id="nav">
                    <li><a class="homeNav" href="adminHome.action" >Trang chủ</a></li>
                    <!--
                    -->
                    <li><a class="userNav" href="showUser.action" >Quản lý user</a></li>
                    <!--
                    -->
                    <li><a class="feedNav" href="showFeed.action" >Quản lý feed</a></li>
                    <!--
                    -->
                    <li><a class="feedbackNav" href="showFeedback.action" >Quản lý feedback</a></li>
                    <!--
                    -->
                </ul>
            </div>
